-
Notifications
You must be signed in to change notification settings - Fork 5
Ajout du backlink sur les iframes de l'assistant #1950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
8149ae2
to
ecff44a
Compare
ecff44a
to
f6d983d
Compare
a77cbfc
to
8749929
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qu'il en soit ainsi :)
export async function generateBackLink(iframe: HTMLIFrameElement, key: BacklinkKey) { | ||
const backlinkTag = document.createElement("div") | ||
backlinkTag.setAttribute( | ||
"style", | ||
"font-size: 0.9rem; text-align: center; padding-top: 0.5rem;", | ||
) | ||
const backlinkContent = await fetch(`${origin}/embed/backlink?key=${key}`) | ||
backlinkTag.innerHTML = await backlinkContent.text() | ||
iframe.insertAdjacentElement("afterend", backlinkTag) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- mieux gérer les erreurs
- ajouter test
) { | ||
const iframe = document.createElement("iframe") | ||
await generateBackLink(iframe, key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await generateBackLink(iframe, key) | |
await generateBackLink(iframe, backlinkKey) |
?
Description succincte du problème résolu
Cf https://www.notion.so/accelerateur-transition-ecologique-ademe/SEO-Ajouter-un-backlink-au-niveau-des-iFrames-2326523d57d780d09411e91b9eb60c8f?source=copy_link
🗺️ contexte: SEO
💡 quoi: Ajout d'un backlink sur les iframes
🎯 pourquoi: Pour améliorer le SEO des intégrations par iframe
🤔 comment:
Dans l'admin wagtail
En front
Exemple résultats / UI / Data
Auto-review
Les trucs à faire avant de demander une review :
.env.template
✅ Reste à faire (PR en cours)
📆 A faire (prochaine PR)